package com.fuze.energy.controller;

import com.fuze.energy.common.Result;
import com.fuze.energy.service.WarningService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "告警事件API")
@Slf4j
@RestController
public class WarningController {

    @Autowired
    WarningService warningService;


    @ApiOperation(value = "根据主板Id查询环网柜告警信息记录")
    @GetMapping(value = "/warning/{mainBoardId}")
    public Result queryAlarmRecords(@PathVariable(name = "mainBoardId") String mainBoardId) {
        return Result.ok(warningService.queryAlarmRecords(mainBoardId));
    }

}
